@echo off
@setlocal
pushd %~pd0

set /p password=please enter password:
REM @set now=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%
@For /f "tokens=1-3 delims=/ " %%a in ('date /t') do (set mydate=%%a%%b%%c)
@For /f "tokens=1-4 delims=/:. " %%a in ("%TIME%") do (set mytime=%%a%%b%%c%%d)
@set now=%mydate%_%mytime%

mysqldump -u root --password=%password% exam > exam_%now%.sql

popd
@endlocal
@echo on